home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / FileSharingMaster 1.0 (US) / FileSharingMaster 1.0 (US).rsrc / HELP_5635 < prev    next >
Encoding:
Text File  |  1996-01-09  |  12.1 KB  |  231 lines

  1.  
  2.  
  3.                                 FileSharing Master stack 1.0
  4.  
  5.                                           by Frédéric RINALDI
  6.  
  7.  
  8.    This stack provides 3 XCMDs and 3 XFCNs that allow to fully master FileSharing : turn it on/off, test its state, share/unshare a folder, get and set its sharing privileges, get users and groups list.
  9.    ShareFolder, GetPrivileges and SetPrivileges can also be used with AppleShare.
  10.  
  11.  
  12.                                        FileSharingIsOn 1.0
  13.  
  14.  
  15. DESCRIPTION
  16.   FileSharingIsOn allows to test is FileSharing is currently running or not. It requires System 7.
  17.  
  18. SYNTAX
  19.                                            FileSharingIsOn()
  20.  
  21. PARAMETERS
  22.    No parameter required.
  23.  
  24.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  25.  
  26. USING
  27.    The XFCN returns true or false depending on current FileSharing state.
  28.  
  29. ERRORS
  30.    If an error occurs, FileSharingIsOn can return :
  31.      "Error : FileSharingIsOn requires System 7"
  32.  
  33. HISTORY
  34. 1.0                                                                                         16/11/92
  35. • First release
  36.  
  37.  
  38.                                         SetFileSharing 1.0
  39.  
  40.  
  41. DESCRIPTION
  42.   SetFileSharing allows to start/stop FileSharing. It requires System 7.
  43.                                                                                          
  44. SYNTAX
  45.                                      SetFileSharing <true|false>
  46.                                                                                          
  47. PARAMETERS
  48.    <true|false> is a boolean. true starts FileSharing, false stops it.
  49.                                                                                          
  50.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  51.                                                                                          
  52. USING
  53.    Think about testing the current FileSharing state with FileSharingIsOn before calling SetFileSharing, or you will get an error.
  54.    FileSharingIsOn will also be valuable to set a repeat loop after starting FileSharing, in order to be sure it is on (see script).
  55.                                                                                          
  56. ERRORS
  57.    If an error occurs, SetFileSharing can return :
  58.      "Error : Couldn't locate File Sharing Extension"
  59.      "Error : File Sharing is off"
  60.      "Error : SetFileSharing requires System 7"
  61.      "Error : Missing or empty parameter"
  62.      "Error : Param is not a boolean"
  63.                                                                                          
  64. HISTORY
  65. 1.0                                                                                         16/11/92
  66. • First release
  67.  
  68.  
  69.                                           ShareFolder 1.0
  70.       
  71.                                                                                    
  72. DESCRIPTION
  73.   ShareFolder allows to start ot stop sharing of a folder or volume.
  74.                                                                                          
  75. SYNTAX
  76.                            ShareFolder <folder path>,<true|false>
  77.                                                                                          
  78. PARAMETERS
  79.    <folder path> is the full pathname of folder to share. As usual, a path of a folder alias can also be passed.
  80.                                                                                          
  81.    <true|false> is a boolean. true starts sharing, false stops it.
  82.                                                                                          
  83.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  84.                                                                                          
  85. USING
  86.    Besure, using FileSharingIsOn, that FileSharing is on before using ShareFolder, and turn it on if necessary using SetFileSharing.
  87.                                                                                          
  88. ERRORS
  89.    If an error occurs, ShareFolder can return :
  90.      "Error : Not a folder"
  91.      "Error : Volume not found"
  92.      "Error : Folder not found"
  93.      "Error : Missing or empty parameter"
  94.      "Error : Param #2 is not a boolean"
  95.      "Error : Too many shared folders"
  96.      "Error : Duplicate shared folder"
  97.      "Error : FileSharing is off"
  98.      "Error : This folder cannot be shared"
  99.      "Error : The folder contains a shared folder"
  100.      "Error : The folder is already shared"
  101.      "Error : FileSharing is off"
  102.      "Error : The folder is not shared"
  103.                                                                                          
  104. HISTORY
  105. 1.0                                                                                         16/11/92
  106. • First release
  107.  
  108.  
  109.                                          GetPrivileges 1.0
  110.    
  111.  
  112. DESCRIPTION
  113.   GetPrivileges return current privileges of a folder
  114.                                                                                          
  115. SYNTAX
  116.                                      GetPrivileges(<folder path>)
  117.                                                                                          
  118. PARAMETERS
  119.    <folder path> is the full pathname of folder to share. As usual, a path of a folder alias can also be passed.
  120.                                                                                          
  121.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  122.                                                                                          
  123. USING
  124.    The XFCN return a full array (four lines of 4 items, line 4 having a 5th item) of informations :
  125.                                                                                          
  126.              owner name|<Any User>,seeFolders,seeFiles,writeAllowed
  127.              group name|<None>,seeFolders,seeFiles,writeAllowed
  128.              <Everyone>seeFolders,seeFiles,writeAllowed
  129.              login name,seeFolders,seeFiles,writeAllowed,userIsOwner
  130.                                                                                          
  131. userIsOwner, seeFolders, seeFiles and writeAllowed are booleans.
  132.                                                                                          
  133.    GetPrivileges can be used even if FileSharing is off or folder is not currently shared.
  134.                                                                                          
  135. ERRORS
  136.    If an error occurs, GetPrivileges can return :
  137.      "Error : Not a folder"
  138.      "Error : Volume not found"
  139.      "Error : Folder not found"
  140.      "Error : Missing or empty parameter"
  141.                                                                                          
  142. HISTORY
  143. 1.0                                                                                         16/11/92
  144. • First release
  145.  
  146.  
  147.                                         SetPrivileges 1.0
  148.  
  149.                                                                                          
  150. DESCRIPTION
  151.   SetPrivileges allows to set access privileges on a folder or volume.
  152.                                                                                          
  153. SYNTAX
  154.          SetPrivileges <folder path>,<owner access>[,<group access>
  155.                                [,<everyone access>]]
  156.         WITH <access> = <name|*>,<see folders>,<see files>,<modify>
  157.                                                                                          
  158. PARAMETERS
  159.    <folder path> is the full pathname of folder to share. As usual, a path of a folder alias can also be passed.
  160.                                                                                          
  161.    <owner access>, <group access> and <everyone access> define respectively access rights for owner, group and everyone. Note that <owner access> must be passed (even empty) if you need to change <group access>, and so on for <everyone access>.
  162.    Each access rights string is shaped as :
  163.                                                                                          
  164.                       name|*,seeFolders,seeFiles,writeAllowed
  165.                                                                                          
  166.    name is the new name to set. You cannot change owner name of a folder of which you are not the current owner. Leaving this item empty allows to keep current name. Passing "*" allows to set <Any User> as owner or <None> as group. This item is simply skipped for Everyone access rights, since having no meaning.
  167.    seeFolders, seeFiles and writeAllowed are booleans. Leaving any of these items empty allows to keep current privileges.
  168.                                                                                          
  169.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  170.                                                                                          
  171. USING
  172.    SetPrivileges can be used even if FileSharing is off or folder is not currently shared, but you must be owner of that folder to be allowed for any privilege change.
  173.    Note also that access parameter are shape-compatible with the result of GetPrivileges XFCN, which may help you.
  174.                                                                                          
  175.    Using examples:
  176.    • if you want to give full access to anybody, and reset owner and group to any, use :
  177.                 SetPrivileges "HD:MyFolder:","*,true,true,true"¬
  178.                                     ,"*,true,true,true","dummy,true,true,true"
  179.                                                                                          
  180.    • if you want to simply add write access to current group, use :
  181.                      SetPrivileges "HD:MyFolder:","",",,,true"
  182.                                                                                          
  183. ERRORS
  184.    If an error occurs, SetPrivileges can return :
  185.      "Error : Not a folder"
  186.      "Error : Volume not found"
  187.      "Error : Folder not found"
  188.      "Error : Unknown user name"
  189.      "Error : Unknown group name"
  190.      "Error : Missing or empty parameter"
  191.      "Error : Must be owner to set privileges"
  192.      "Error : Item #X of param #Y is not a boolean"
  193.                                                                                          
  194. HISTORY
  195. 1.0                                                                                         16/11/92
  196. • First release
  197.  
  198.  
  199.                                    UsersAndGroupsList 1.0
  200.   
  201.                                                                                        
  202. DESCRIPTION
  203.   UsersAndGroupsList returns the list of defines users and groups.  It requires System 7.
  204.                                                                                          
  205. SYNTAX
  206.                                       UsersAndGroupsList()
  207.                                                                                          
  208. PARAMETERS
  209.    No parameter is required.
  210.                                                                                          
  211.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  212.                                                                                          
  213. USING
  214.    The XFCN returns a two lines of items result, being respectively the list of users and the list of groups.
  215.                                                                                          
  216. ERRORS
  217.    If an error occurs, UsersAndGroupsList can return :
  218.      "Error : Out of memory"
  219.      "Error : FileSharing is off"
  220.      "Error : UsersAndGroupsList requires System 7"
  221. --------------------------------------------------------------------
  222.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  223.  
  224.           FileSharingIsOn, UserAndGroupsList, GetPrivileges XFCNs,
  225.                 SetFileSharing, ShareFolder, GetPrivileges XCMDs,
  226.                            © Frederic Rinaldi, 1989…1993.
  227.  
  228.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  229.  
  230. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  231.                Internet : RINALDI1@APPLELINK@APPLE.COM